#pragma once

#include "common.h"
#include "csem_api.h"
#include "dist.h"
#include "sleep_api.h"

#ifdef __cplusplus
extern "C" {
#endif

// csem版本的分期
void csem_seg(const dist_action_t *dist, uint64_t sleep_start,
              uint64_t wake_start, const smp_hr_t *slist, size_t count,
              linked_list_t *staging_list, uint32_t *csem_inteval);
void csem_impl(csem_sleep_t *csem_slps, size_t slp_len, const smp_hr_t *list,
               size_t len, sleep_root **root);

#ifdef __cplusplus
}
#endif